package com.liandu.entity;

import com.liandu.common.parent.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@ToString
@Entity
@Table(name = "busiInfo")
//经营户信息
public class BusiInfo extends BaseEntity {
    private static final long serialVersionUID = -7711781418110330342L;
    @Id
    private Long ID;//流水号

    private String busiInfoID;//经营主体编码

//    private String marketId;//菜市场ID

    private String busiNo;//经营户本地编码

    private String busiName;//经营户名称

    private String identiNum;//经营户身份证

    private String tel;

    private String comId;//商户号

    private String zhifubaoAccount;

    private Integer type;//类型

    private Integer cr;//性质

    private String name;//经营户（联系人）姓名

    private String addr;//联系人地址

    private String checkmancode;//登记代码

    private String checkmanname;//登记人姓名

    private Integer usetag;//

    private Integer traceNo;

//    private Date insertDateTime;

    private Integer property;//其他

    private String busiType;//卖方

    private String recordDate;

    private String legalRepresent;

    private Date updateTime;

    private String status;

    private Integer vege_id;//用于生成vege_batch_id

    private Integer meat_id;//用于生成meat_batch_id

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "marketId")
    @NotFound(action= NotFoundAction.IGNORE)
    private Market market;

}
